package simple;

import static java.lang.System.out;

public class Test3 {
	public static void main(String[] args) {
		long pre = 0;
		long last = 1;
		while (pre <= 1000 || last <= 1000) {
			if (pre <= 1000) {
				out.println(pre);
			}
			if (last <= 1000) {
				out.println(last);
			}
			pre = pre + last;
			last = pre + last;
		}
	}
}
